package com.kk.utils;

import java.util.concurrent.Executors;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author 王志强
 * @date 2021-12-02
 * description: 定义线程池
 */
public final class AdvanceThreadPool {

    /**
     * 线程池
     */
    public static ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(
            10, 1000, 60L,
            TimeUnit.SECONDS, new SynchronousQueue<>(),
            Executors.defaultThreadFactory(), new ThreadPoolExecutor.AbortPolicy());

}
